<?php

/**
 * 
 *
 * @version $Id: mes_forw.inc.php,v 1.7 2005/01/06 17:54:18 phppc Exp $
 * @copyright 2004 
 **/
		
		if (!empty($this->message_green)) { // positive messages
			foreach($this->message_green as $mid) {
				$this->tpl_load("message_green","uf/");
				$this->tpl_replace_vars(array("mid" => $mid));
				$this->mgreen .= $this->tpl_output();
			}
		}
		if (!empty($this->message_red)) { // negative messages
			foreach($this->message_red as $mid) {
				$this->tpl_load("message_red","uf/");
				$this->tpl_replace_vars(array("mid" => $mid));
				$this->mred .= $this->tpl_output();   
			}
		}
		if (!empty($this->w_leitung)) { // forwarding
			$this->w_leitung["zeit"] = "2"; // standard time after the user will be forwarded to a certain page
			$w_number = $this->w_leitung["number"];
			// If a url wasn't set the back-function of the browser will be used
			if(!isset($this->w_leitung["url"])) $this->w_leitung["url"] = "javascript:history.back();";
			$this->tpl_load("weiterleitung","uf/");
			$this->tpl_replace_vars(array("w_number" => $this->w_leitung["number"],"w_url" => $this->w_leitung["url"]));
		    $this->weiterleitung = $this->tpl_output();
		    $this->tpl_load("weiterleitung_code","uf/");
		    $this->tpl_replace_vars(array("w_zeit" => $this->w_leitung["zeit"],"w_url" => $this->w_leitung["url"]));
			$this->weiterleitung_meta = $this->tpl_output();
		}
?>